package command;

import util.Customer;
import util.CustomerStorage;
import util.IO;

public class CheckMembershipCommand implements Command {
    public static final String NOT_LOGGED_IN_MESSAGE = "Please talk to a Librarian.Thank you.\n";

    public CheckMembershipCommand() {

    }

    @Override
    public void run() {
        displayMessage();
    }

    private void displayMessage() {
        Customer customer = CustomerStorage.getLoginCustomer();
        if (customer != null)
            IO.output(customer.toString());
        else
            IO.output(NOT_LOGGED_IN_MESSAGE);
    }
}
